import http from '../utils/http'
/**
 * 绑定手机号
 * @param {*} data 
 * @param {*} cbFunc 
 */
function bindPhone(data, cbFunc) {
  http.put('/user/bind-phone', data).then(res => {
    cbFunc(res)
  })
}
/**
 * 更新定位
 * @param {*} data 
 * @param {*} cbFunc 
 */
function setLocation(data, cbFunc) {
  http.put('/user/set-location', data).then(res => {
    cbFunc(res)
  })
}
/**
 * 更新用户信息
 * @param {*} data 
 * @param {*} cbFunc 
 */
function update(data, cbFunc) {
  http.put('/user', data).then(res => {
    cbFunc(res)
  })
}


module.exports = {
  bindPhone: bindPhone,
  setLocation: setLocation,
  update: update
}